import { MockMethod } from 'vite-plugin-mock'

export default [
  {
    url: '/user/login',
    timeout: 200,
    method: 'post',
    response: () => {
      return {
        code: 0,
        data: {
          token: 'eca4bb1529bb5b4dcd3c9aa68e9e185d',
          timeout: 180000
        },
        msg: 'success'
      }
    }
  },
  {
    url: '/user/getInfo',
    timeout: 200,
    method: 'get',
    response: () => {
      return {
        code: 0,
        data: {
          userInfo: {
            usrName: 'Admin'
          },
          roles: ['Admin']
        },
        msg: 'success'
      }
    }
  }
] as MockMethod[]
